
function setupWebViewJavascriptBridge(callback) {
    if (window.WebViewJavascriptBridge) { return callback(WebViewJavascriptBridge); }
    if (window.WVJBCallbacks) { return window.WVJBCallbacks.push(callback); }
    window.WVJBCallbacks = [callback];
    var WVJBIframe = document.createElement('iframe');
    WVJBIframe.style.display = 'none';
    WVJBIframe.src = 'wvjbscheme://__BRIDGE_LOADED__';
    document.documentElement.appendChild(WVJBIframe);
    setTimeout(function() { document.documentElement.removeChild(WVJBIframe) }, 0)
}

setupWebViewJavascriptBridge(function(bridge) {
                             
                             bridge.registerHandler('zanSucess', function(data, responseCallback)
                                                    {
                                                        changeZan(data);
                                                    });
                             
                             })

//点击分享
function onClickShare(id){
    WebViewJavascriptBridge.callHandler('ShareCallback',id,function(response) {});
}

//点击图片
function onClickImage(id){
    WebViewJavascriptBridge.callHandler('touchNewsDetailImage',id,function(response) {});
}

//点击相关推荐
function onClickXiangGuan(id){
    WebViewJavascriptBridge.callHandler('touchRelatedNews',id,function(response) {});
}
//点击更多推荐
function onClickMoreRecommend(id){
    WebViewJavascriptBridge.callHandler('touchMoreNews',id,function(response) {});
}

//点赞
function onClickZan(){
    WebViewJavascriptBridge.callHandler('ZanCallback','',function(response) {});
}

//查看更多评论
function onClickToComment(){
    WebViewJavascriptBridge.callHandler('ToCommentCallback','',function(response) {});
}


